package javaseof10day.day9.am.demo1;

/*
 * @FileName: Student.class
 * @version:1.0
 * @author:nazi
 * 描述：模型层
 * */
import java.io.Serializable;
 
/*
 * Summary: Student类实现序列化接口，用于对象的保存
 * @author：nazi
 * @version:1.0
 * */
public class Student implements Serializable {
	//序列化id
	private static final long serialVersionUID = 9088453456517873574L;
	int num;
	String name;
	String sex;
	int age;
	float grade;
	
	public Student(int num ,String nameString,String sexString,int g,float f){
		this.num =num;
		name = nameString;
		sex =sexString;
		age =g;
		grade =f;
	}
	
	
	public int getNum(){
		return num;
	}
 
	public String getName(){
		return name;
	}
 
	public String getSex(){
		return sex;
	}
 
	public int getAge(){
		return age;
	}
 
	public float getGrades(){
		return grade;
	}
	
	public String toString(){
		return "姓名:"+name+"学号:"+num+"性别:"+sex+"年龄:"+age+"成绩:"+grade;
		
	}
}

